package com.rin.design_pattern.abstract_factory;

import com.rin.design_pattern.common.color.Color;
import com.rin.design_pattern.common.shape.*;

/**
 * @author RinMi
 * @since 2023/5/26
 */
public class ShapeFactory extends AbstractFactory{

    @Override
    public Shape getShape(String shapeType) {
        if (shapeType == null) {
            return null;
        }
        if (ShapeType.CIRCLE.equals(shapeType)) {
            return new Circle();
        }
        if (ShapeType.SQUARE.equals(shapeType)) {
            return new Square();
        }
        if (ShapeType.RECTANGLE.equals(shapeType)) {
            return new Rectangle();
        }
        return null;
    }

    @Override
    public Color getColor(String colorType) {
        return null;
    }
}
